[Keras] 模型可视化 plot | 您所在的位置:网站首页 › plot layers › [Keras] 模型可视化 plot |
Keras中提供了一个神经网络可视化的函数plot_model,并可以将可视化结果保存在本地: keras的中文手册是这样写的: keras.utils.vis_utils模块提供了画出Keras模型的函数(利用graphviz) 该函数将画出模型结构图,并保存成图片: from keras.utils import plot_model plot_model(model, to_file='model.png') plot_model接收两个可选参数: show_shapes:指定是否显示输出数据的形状,默认为False show_layer_names:指定是否显示层名称,默认为True from keras.utils.vis_utils import plot_model model = unet() plot_model(model, to_file='model-unet.png',show_shapes=true)我这里可视化了一个U-net模型 |
CopyRight 2018-2019 实验室设备网 版权所有 |